package com.dayuanit.dy16.atm.mapper;

import com.dayuanit.dy16.atm.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<Message> listMessage(@Param("userId") Long userId,
                              @Param("offset") Integer offset,
                              @Param("pageSize") Integer pageSize);

    int countMessage(@Param("userId") Long userId);

    List<Message> listMsgByStatus(@Param("status") Integer status, @Param("userId") Long usreId);
}